home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_02_06 / tp55rtl.src < prev    next >
Text File  |  1990-11-04  |  13KB  |  413 lines

  1. ;=============================================================================
  2. ;=============================================================================
  3. ;
  4. ;                Label Name Library for Turbo Pascal v5.5
  5. ;
  6. ;   Writen by Clark A. Calkins,
  7. ;             C. C. Software
  8. ;             1907 Alvarado Ave.
  9. ;             Walnut Creek, CA 94596
  10. ;
  11. ;             circa September 1990
  12. ;
  13. ;   This file may be freely copied and used for non-commercial purposes.
  14. ;   Intended for use with the Masterful Disassembler (MD86) version 2.3 or
  15. ;   later. This file should be compiled with MD86MAC v1.3 or later. No
  16. ;   compiler error or warning messages should be generated.
  17. ;
  18. ;   There are no known coding errors in these definitions but no guarantees
  19. ;   are implied.
  20. ;
  21. ;=============================================================================
  22. ;
  23. ;   Initialize routine. This sets interupt vectors and segment registers.
  24. ;
  25. label     = TpInit
  26.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff
  27.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  28.   compare = $ba,$00,$00,$8e,$da,$8c,$06,$00,$00,$33,$ed,$8b,$c4,$05
  29.   compare = $13,$00,$b1,$04,$d3,$e8,$8c,$d2,$03,$c2
  30. endlabel
  31. ;
  32. ;   Normal exit routine.
  33. ;
  34. label     = TpExit
  35.   mask    = $ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff
  36.   mask    = $ff,$ff,$ff,$ff
  37.   compare = $33,$c9,$33,$db,$ba,$00,$00,$8e,$da,$fb,$a3,$00,$00,$8b
  38.   compare = $c1,$0b,$c3,$74
  39. endlabel
  40. ;
  41. ;   String support functions.
  42. ;
  43. label     = StrStore
  44.   nomask
  45.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$08,$36,$c5,$77,$04
  46.   compare = $ac,$aa,$8a,$c8,$32,$ed,$f3,$a4,$8e,$da,$ca,$04,$00
  47. endlabel
  48. ;
  49. label     = StrMove
  50.   nomask
  51.   compare = $fc,$8b,$dc,$8c,$da,$36,$c5,$77,$0a,$36,$c4,$7f,$06
  52.   compare = $36,$8b,$4f,$04,$ac,$3a,$c1,$76,$02,$8a,$c1,$aa,$8a
  53.   compare = $c8,$32,$ed,$f3,$a4,$8e,$da,$ca,$0a,$00
  54. endlabel
  55. ;
  56. label     = StrCopy
  57.   nomask
  58.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$0c,$36,$c5,$77,$08
  59.   compare = $8a,$04,$32,$e4,$36,$8b,$4f,$06,$0b,$c9,$7f,$03,$b9
  60.   compare = $01,$00,$03,$f1,$2b,$c1,$72,$13,$40,$36,$8b,$4f,$04
  61.   compare = $0b,$c9,$7d,$02,$33,$c9,$3b,$c1,$76,$06,$8b,$c1,$eb
  62.   compare = $02,$33,$c0,$aa,$8b,$c8,$f3,$a4,$8e,$da,$ca
  63. endlabel
  64. ;
  65. label     = StrAdd
  66.   nomask
  67.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$08,$36,$c5,$77,$04
  68.   compare = $26,$8a,$0d,$32,$ed,$ac,$26,$00,$05,$73,$08,$26,$c6
  69.   compare = $05,$ff,$8a,$c1,$f6,$d0,$03,$f9,$47,$8a,$c8,$f3,$a4
  70.   compare = $8e,$da,$ca,$04,$00
  71. endlabel
  72. ;
  73. label     = StrLngth
  74.   nomask
  75.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$8a,$05,$32,$e4,$ca,$04
  76.   compare = $00
  77. endlabel
  78. ;
  79. label     = WrtItem
  80.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00
  81.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  82.   compare = $55,$8b,$ec,$1e,$c4,$7e,$0c,$06,$57,$e8,$00,$00
  83.   compare = $75,$25,$c5,$76,$08,$8b,$4e,$06,$fc,$ac,$32,$e4,$2b,$c8
  84. endlabel
  85. ;
  86. label     = IO_end
  87.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  88.   mask    = $ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff
  89.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$83,$7d,$1a,$00,$75,$03,$ca,$04
  90.   compare = $00,$83,$3e,$00,$00,$00,$75,$f6,$06,$57
  91. endlabel
  92. ;
  93. label     = Get_IO
  94.   mask    = $ff,$ff,$ff,$ff,$00,$00,$ff
  95.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  96.   compare = $33,$c0,$87,$06,$00,$00,$cb
  97.   compare = $83,$3e,$00,$00,$00,$75,$01,$cb,$a1,$00,$00,$e9
  98. endlabel
  99. label     = Check_IO
  100.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  101.   compare = $83,$3e,$00,$00,$00,$75,$01,$cb,$a1,$00,$00,$e9
  102. endlabel
  103. ;
  104. label     = Line_end
  105.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff
  106.   mask    = $ff,$00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  107.   mask    = $ff
  108.   compare = $8b,$dc,$36,$c4,$7f,$04,$06,$57,$e8,$00,$00,$75,$0a,$b0,$0d
  109.   compare = $e8,$00,$00,$b0,$0a,$e8,$00,$00,$5f,$07,$26,$89,$5d,$08,$eb
  110.   compare = $06
  111. endlabel
  112. ;
  113. label     = RdStrItm
  114.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00
  115.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  116.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  117.   mask    = $ff,$ff,$ff
  118.   compare = $55,$8b,$ec,$1e,$c4,$7e,$0c,$06,$57,$e8,$00,$00
  119.   compare = $c5,$76,$08,$b9,$00,$00,$75,$15,$e8,$00,$00,$3c
  120.   compare = $0d,$74,$0e,$3c,$1a,$74,$0a,$43,$41,$46,$88,$04
  121.   compare = $3b,$4e,$06
  122. endlabel
  123. ;
  124. label     = Get_EOL
  125.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  126.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  127.   mask    = $ff,$ff,$00,$00,$ff,$ff
  128.   compare = $8b,$dc,$36,$c4,$7f,$04,$06,$57,$e8,$00,$00,$75
  129.   compare = $14,$e8,$00,$00,$3c,$1a,$74,$0d,$43,$3c,$0d,$75
  130.   compare = $f4,$e8,$00,$00,$3c,$0a
  131. endlabel
  132. ;
  133. ;   Long and short integer file I/O procedures.
  134. ;
  135. label     = WrtDblWd
  136.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  137.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff
  138.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  139.   mask    = $ff
  140.   compare = $55,$8b,$ec,$83,$ec,$20,$8b,$46,$08,$8b,$56,$0a
  141.   compare = $8d,$7e,$e0,$16,$07,$e8,$00,$00,$c4,$7e,$0c,$06
  142.   compare = $57,$e8,$00,$00,$75,$1f,$8b,$46,$06,$2b,$c1,$7e
  143.   compare = $0d
  144. endlabel
  145. ;
  146. label     = RdDblWrd
  147.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  148.   mask    = $00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff
  149.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  150.   compare = $55,$8b,$ec,$83,$ec,$20,$c4,$7e,$06,$06,$57,$e8
  151.   compare = $00,$00,$be,$00,$00,$75,$21,$e8,$00,$00,$3c,$1a
  152.   compare = $74,$1a,$3c,$20,$77,$03,$43,$eb,$f2
  153. endlabel
  154. ;
  155. ;   Procedure to assign a file name to a file variable. Used for text type
  156. ;   files.
  157. ;
  158. labelname = Txt_asgn
  159.   nomask
  160.   compare = $8b,$dc,$1e,$36,$c4,$7f,$08,$36,$c5,$77,$04,$fc,$33,$c0
  161.   compare = $ab,$b8,$b0,$d7,$ab,$b8,$80,$00,$ab,$33,$c0,$ab,$ab,$ab
  162. endlabel
  163. ;
  164. ;   Procedure to assign binary files.
  165. ;
  166. labelname = Bin_asgn
  167.   nomask
  168.   compare = $8b,$dc,$1e,$36,$c4,$7f,$08,$36,$c5,$77,$04,$fc,$33,$c0
  169.   compare = $ab,$b8,$b0,$d7,$ab,$33,$c0,$b9,$16,$00,$f3,$ab
  170. endlabel
  171. ;
  172. ;   Procedure to open a text file.
  173. ;
  174. labelname = Txt_open
  175.   nomask
  176.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$8b,$45,$02,$3d,$b1,$d7
  177.   compare = $74,$12,$3d,$b2,$d7,$74,$0d
  178. endlabel
  179. ;
  180. ;   Procedure to open a text file for reading.
  181. ;
  182. labelname = TxtReset
  183.   nomask
  184.   compare = $ba,$b1,$d7,$eb
  185.   argument
  186.     rbyte = 4
  187.     type  = nearaddress
  188.     name  = Txt_open
  189.   endargument
  190. endlabel
  191. ;
  192. ;   Procedure to open a text file for writing.
  193. ;
  194. labelname = TxtWrite
  195.   nomask
  196.   compare = $ba,$b2,$d7,$eb
  197.   argument
  198.     rbyte = 4
  199.     type  = nearaddress
  200.     name  = Txt_open
  201.   endargument
  202. endlabel
  203. ;
  204. ;   Procedure to open a binary file for reading.
  205. ;
  206. labelname = BinReset
  207.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff
  208.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  209.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  210.   compare = $a0,$00,$00,$b4,$3d,$33,$d2,$eb,$06
  211.   compare = $b8,$00,$3c,$ba,$01,$00,$55,$8b,$ec,$c4,$7e,$08,$26,$81,$7d
  212.   compare = $02,$b0,$d7,$74,$1a,$26,$81,$7d,$02,$b3,$d7,$74,$08
  213. endlabel
  214. ;
  215. ;   Procedure to open a binary file for writing.
  216. ;
  217. labelname = BinWrite
  218.   nomask
  219.   compare = $b8,$00,$3c,$ba,$01,$00,$55,$8b,$ec,$c4,$7e,$08,$26,$81,$7d
  220.   compare = $02,$b0,$d7,$74,$1a,$26,$81,$7d,$02,$b3,$d7,$74,$08
  221. endlabel
  222. ;
  223. ;============================================================================
  224. ;   Label names for the CRT unit.
  225. ;============================================================================
  226. ;
  227. ;   Label name for GOTOXY(x,y) procedure.
  228. ;
  229. labelname = GotoXYp
  230.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  231.   mask    = $00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff
  232.   mask    = $00,$00,$ff,$ff
  233.   compare = $8b,$dc,$36,$8a,$57,$06,$36,$8a,$77,$04,$fe,$ca,$02,$16
  234.   compare = $00,$00,$72,$17,$3a,$16,$00,$00,$77,$11,$fe,$ce,$02,$36
  235.   compare = $00,$00,$72,$09
  236. endlabel
  237. ;
  238. ;   The clear to end of line procedure CLREOL.
  239. ;
  240. labelname = ClrEol
  241.   mask    = $ff,$00,$00,$ff,$